import request from '@/utils/request'

export const getDepartmentRequest = () => {
  return request.get('api/company/department')
}

export const getUserSimpleRequest = () => {
  return request.get('api//sys/user/simple')
}
export const addDepartmentRequest = (data) => {
  return request.post(`api/company/department`, data)
}

export const getDepartmentByIdRequest = (id) => {
  return request.get(`api/company/department/${id}`)
}
export function updateDepartmentByIdRequest(data) {
  return request.put(`api/company/department/${data.id}`, data)
}

export const deleteDepartmentByIdRequest = (id) => {
  return request.delete(`api/company/department/${id}`)
}
